﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using YULI.Common;

namespace YULI.Web.admin
{
    public partial class index : YULI.Web.UI.ManagePage
    {
        protected string action = string.Empty;

        protected Model.manager AdminInfo;//管理员信息
        protected void Page_Load(object sender, EventArgs e)
        {
            this.action = YULIRequest.GetQueryString("action");
            if (this.action == "exit")
            {
                Session[YULIKeys.SESSION_ADMIN_INFO] = null;
                Utils.WriteCookie("AdminName", sysConfig.sysencryptstring, -14400);
                Utils.WriteCookie("AdminPwd", sysConfig.sysencryptstring, -14400);
                Response.Redirect("login.aspx");
            }

            if (!Page.IsPostBack)
            {
                AdminInfo = GetAdminInfo();
            }
        }
    }
}